home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / UNSPLIT / text1071.txt < prev    next >
Encoding:
Text File  |  1997-02-06  |  2.8 KB  |  87 lines

  1. > > > To TT-RAM I get 35.9 MB/s read and 16 MB/s write.
  2. > > 
  3. > > That sounds rather low, but see below.
  4. > Esspecially the write-access.
  5.  
  6. Yes, but:
  7.  
  8. > > 16 bit in that case). I guess the '040 might have to read the entire cache
  9. > > line first when writing, though, unless you use move16.
  10.  
  11. > > (Assuming the AB040 does burst, which seems likely.)
  12. > I can't see, why it shouldn't have it. It has a full-spec. 32-bit BUS with 
  13. > the BUS clock being the external CPU clock.
  14.  
  15. Exactly.
  16.  
  17. > > According to Motorola's 680x0 optimization document:
  18. > > Saving/restoring registers:
  19. ...
  20. > > Which suggests that using movem for memory speed test isn't a good idea
  21. > > on that processor. I've no idea how large the difference is, though.
  22. > It's funny that the 68060 doesn't act the same way as the 68040 in that 
  23. > regard.
  24.  
  25. Actually, the '040 is a very funny chip in many ways.
  26. '060 optimization can be quite different:
  27.  
  28. Operations with long immediate values between -128 and 127:
  29.  
  30.    A:   add.l   #20,d1        B:  moveq.l    #20,d0
  31.                                   add.l      d0,d1
  32.  
  33.    68040/xx:     A
  34.    68000/20/60:  B
  35.  
  36. Keep memory operands in registers:
  37.  
  38.    A:  add.l   _var,d1       B:  move.l   _var,d0
  39.        add.l   _var,d2           add.l    d0,d1
  40.                                  add.l    d0,d2
  41.  
  42.    68040:           A (as long as total # of instructions are less)
  43.    68000/20/60/xx:  B
  44.  
  45.  
  46.  
  47. 68040:
  48.    Use as few instructions as possible (even if they are longer)
  49.    Values can be kept in memory
  50.    Avoid pipe-line stalls for some effective addresses
  51.    Avoid subtracts to address registers
  52.  
  53. 68060:
  54.    Use short instructions
  55.    Keep values in registers
  56.    Schedule instructions for superscalar execution
  57.    Inline short functions
  58.  
  59. > > Trying to figure out the instruction timing tables is not simple, but to me
  60. > > it looks like succeding MOVEMs with four registers will take seven cycles
  61. > > each, while four simple MOVEs will only take four cycles.
  62. > > That is, it _might_ be possible to almost double the figures.
  63. > Sounds reasonable enough. And me who always thought that `movem' was always 
  64. > faster than every other move-instruction, no matter what brand of 68xxx CPU.
  65.  
  66. Those seven cycles might be wrong, but at least Motorola clearly states that
  67. four MOVEs should be faster than one four register MOVEM, at least for
  68. stack pre-decrement accesses.
  69.  
  70. It's strange though that Magnus reported cache read/write speeds of around
  71. 130 Mbyte/s, since 4 * 33 _is_ 132.
  72.  
  73. > By the way, I found the reason for my ST-RAM access quotes.
  74.  
  75. I thought something wasn't quite right.  ;-)
  76.  
  77. -- 
  78.   Chalmers University   | Why are these |  e-mail:   rand@cd.chalmers.se
  79.      of Technology      |  .signatures  |            johan@rand.thn.htu.se
  80.                         | so hard to do |  WWW/ftp:  rand.thn.htu.se
  81.    Gothenburg, Sweden   |     well?     |            (MGIFv5, QLem, BAD MOOD)
  82.  
  83.